(setq package-archives '(("gnu"   . "http://mirrors.tuna.tsinghua.edu.cn/elpa/gnu/")
			 ("melpa" . "http://mirrors.tuna.tsinghua.edu.cn/elpa/melpa/")))
(package-initialize) ;; You might already have this line

(setq inhibit-startup-message t)
(global-linum-mode t)
(global-hl-line-mode t)
(tool-bar-mode 0)

;;(setq evil-want-C-u-scroll t)
;;(global-evil-leader-mode)
;;(evil-mode 1)
;;(evil-leader/set-leader "\\")

;(when (not (display-graphic-p))
;  (progn
;    (setq evil-want-C-u-scroll t)
;    (global-evil-leader-mode)
;    (evil-mode 1)
;    (evil-leader/set-leader "\\")))

(if (eq system-type 'darwin) (setq exec-path (cons "/usr/local/bin" exec-path)))

(load-theme 'vscode-dark-plus t)
;;(set-face-attribute hl-line-face nil :underline t)

(helm-mode 1)


(ac-config-default)

;; 绑定快捷键
(global-set-key (kbd "C-x C-f") 'helm-find-files)
;;(global-set-key (kbd "s-s") 'sr-speedbar-toggle)

;;波浪号文件统一放到一个文件夹下
(setq backup-directory-alist '(("." . "~/.emacs_backup"))
  backup-by-copying t    ; Don't delink hardlinks
  version-control t      ; Use version numbers on backups
  delete-old-versions t  ; Automatically delete excess backups
  kept-new-versions 20   ; how many of the newest versions to keep
  kept-old-versions 5    ; and how many of the old
  )

;; you can move between windows with the 【Shift+→】/ 【Shift+←】/ 【Shift+↓】 / 【Shift+↑】 key sequences
(windmove-default-keybindings)

;; How to change the default split-screen direction?
;; https://stackoverflow.com/questions/7997590/how-to-change-the-default-split-screen-direction
;;(setq split-width-threshold nil)

;;强制buffer显示在当前window
(add-to-list 'display-buffer-alist
             '("^\\*shell\\*$" . (display-buffer-same-window)))

(global-set-key (quote [M-down]) (quote scroll-up-line)) (global-set-key (quote [M-up]) (quote scroll-down-line)) 

(provide 'base-init)
